#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include<unistd.h>
#include<string.h>


int main()
{
  int fd = open("./log.txt",O_WRONLY|O_CREAT|O_APPEND,0666);
  if(fd == -1)
  {
    perror("open");
    return -1;
  }
  const char* str = "abcd123\n";

  write(fd,str,strlen(str));
  
  close(fd);
  return 0;
}
